import http from './__http__'
import { getBaseURL } from '@/util/comman'
export const getUserApi = () => {
  const baseURL = getBaseURL();
  return http.request({
    url: baseURL + '/GwQuery/UserInfo'
  })
}
// export const addUserApi = (data) => {
//   return http.request({
//     url: '/user/add',
//     method: 'post',
//     data
//   })
// }
export const updateUserApi = (data) => {
  return http.request({
    url: baseURL + '/GwConfig/UserInfo',
    method: 'post',
    data
  })
}
// export const delUserApi = (data) => {
//   return http.request({
//     url: '/user/del',
//     method: 'post',
//     data
//   })
// }

export const getTagApi = (params, data) => {
  return http.request({
    url: '/tag/queryList',
    method: 'post',
    params,
    data
  })
}

export const getUserDeviceTagApi = (params,data) => {
  return http.request({
    url: '/user/deviceTag',
    method: 'post',
    params,
    data
  })
}

export const bindUserDeviceTagApi = (data) => {
  return http.request({
    url: '/user/bindDeviceTag',
    method: 'post',
    data
  })
}

export const unbindUserDeviceTagApi = (data) => {
  return http.request({
    url: '/user/unbindDeviceTag',
    method: 'post',
    data
  })
}